package com.bw.shopping.bind;

import androidx.databinding.BindingAdapter;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;

public
/**
 * @author Lishaohe
 * @description:
 * @date :2021/11/1 0001 下午 7:05
 *
 */
class OrderListBind {
    @BindingAdapter(value = {"listadapter"})
    public static void BindList(
            RecyclerView recyclerView,
            BaseQuickAdapter adapter
    ){
        LinearLayoutManager manager = new LinearLayoutManager(recyclerView.getContext());
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        recyclerView.setLayoutManager(manager);
        recyclerView.setAdapter(adapter);
    }
}
